package com.zygh.lz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zygh.lz.entity.app.AppMenu;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Staff implements Serializable {

    @ApiModelProperty(value = "人员ID", example = "1")
    @TableId(type = IdType.AUTO)
    private Integer sysStaffId;

    @ApiModelProperty(value = "警员名字")
    private String staffName;

    @ApiModelProperty(value = "警员职位")
    private String staffPost;

    @ApiModelProperty(value = "登录账号")
    private String staffTel;

    @ApiModelProperty(value = "app角色")
    private Integer appRoleId;

    @ApiModelProperty(value = "所属部门id")
    private Integer sysSectionId;

    @ApiModelProperty(value = "角色id")
    private Integer sysRoleId;

    @ApiModelProperty(value = "性别")
    private String staffSex;

    @ApiModelProperty(value = "照片")
    private String staffPhoto;

    @ApiModelProperty(value = "密码")
    private String staffPassword;

    @ApiModelProperty(value = "层级")
    private String staffHierarchy;

    @ApiModelProperty(value = "直系领导id")
    private Integer stafffPid;
    @ApiModelProperty(value = "警号")
    private String staffNum;

    @ApiModelProperty(value = "警务通号")
    private String staffIdcard;

    @ApiModelProperty(value = "状态1登录0未登")
    private String staffOnline;

    @ApiModelProperty(value = "人员列表")
    @TableField(exist = false)
    private List<Staff> staffList;

    @ApiModelProperty(value = "部门")
    @TableField(exist = false)
    private String sectionName;

    @ApiModelProperty(value = "是民警还是辅警（警类）")
    private String stafftype;

    @ApiModelProperty(value = "是基础警力、增员警力、叠加警力")
    private String strength;
    @ApiModelProperty(value = "上下午班区分；1代表上午班，2代表下午班")
    private String changeShifts;

    @ApiModelProperty(value = "警员最新gps")
    @TableField(exist = false)
    private Gps gps;

    @ApiModelProperty(value = "区域标注")
    @TableField(exist = false)
    private Xarea xarea;

    @ApiModelProperty(value = "警员负责区域列表")
    @TableField(exist = false)
    private List<Xarea> xareaList;

    @ApiModelProperty(value = "手机号")
    private String cellphonenumber;
    @ApiModelProperty(value = "身份证号")
    private String identification;

    //时长
    @ApiModelProperty(value = "巡查时长")
    @TableField(exist = false)
    private String duration;
    //距离
    @ApiModelProperty(value = "巡查距离")
    @TableField(exist = false)
    private Double juli;

    //上岗时间
    @ApiModelProperty(value = "上岗时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date patrolRecordBegintime;
    @TableField(exist = false)
    private Integer sectionpid;
    @TableField(exist = false)
    private Patrolrecord patrolrecord;
    @TableField(exist = false)
    private String assignmentname;
    @TableField(exist = false)
    private String name;
    @TableField(exist = false)
    private Integer id; //区域id
    @TableField(exist = false)
    private String gridding;

    @ApiModelProperty(value = "单位")
    private String unit;

    @TableField(exist = false)
    private List<AppMenu> appMenus = new ArrayList<>();

    @ApiModelProperty(value = "坐标上传频率 单位：毫秒")
    private Integer frequency;

    @ApiModelProperty(value = "数字电台号")
    private String digitalRadio;

    @ApiModelProperty(value = "人员状态")
    private String userStatus;

    @ApiModelProperty(value = "修改时间")
    private String updateTime;

    @TableField(exist = false)
    private Long roleId;
}